package com.cg.controller;

import com.cg.client.AppClient;
import com.cg.dto.Result;
import com.cg.entity.Country;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName CountryController
 * @Description TODO
 * @Author CG
 * @Date 2024/1/3 16:59
 **/
@RestController
@RequestMapping("/country")
public class CountryController {

    @Resource
    private AppClient appClient;

    /**
     * 加载所有国家
     */
    @GetMapping("/queryCountryList")
    public Result<List<Country>> queryCountryList(){
        return appClient.queryCountryList();
    }
}
